Skip to content

Ensure compatibility with WordPress 7.2 - #1377

Merged
gabrielcld2 merged 1 commit into
developfrom
chore/wp-7-2-compatibility
Nov 23, 2026
Merged

gabrielcld2 merged 1 commit into
developfrom
chore/wp-7-2-compatibility

Conversation

@utkarshcloudinary

@utkarshcloudinary utkarshcloudinary commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Approach

Tested the plugin against WordPress 7.2 and compared the results with 7.1.4. The plugin was tested on 7.2-RC2 with the latest develop and checked against the WordPress 7.2 Field Guide. No regressions were found.

Changes

  • Rebuilt the committed assets from the current lockfile. The bundles still contained @wordpress/components 43. They now use @wordpress/components 44.0.0, @wordpress/ui 0.26.0 and @wordpress/dataviews 22.0.0. These are the minimum versions in the 7.2 dev note Update bundled @wordpress/* packages … to fix CSS module class name collisions. css/gallery-ui.css bundles the @wordpress/components styles, so this applies to the plugin.
  • .wp-env.json and .wp-env.ci.json now run WordPress 7.2 (wordpress-7.2-RC2.zip), so local development and CI test against 7.2. WordPress/WordPress has no 7.2 branch or tag yet. Change core to the next RC, then to WordPress/WordPress#7.2 when 7.2 is released.

Client-side media processing (new in 7.2), tested on RC2 in Chrome

  • In 7.2, images uploaded from the Media Library grid, Add New Media File and the media modal are resized in the browser. They go through /wp/v2/media, then /sideload, then /finalize, and no longer through async-upload.php.
  • The image was uploaded from the grid and from the editor's media modal. All REST steps succeeded.
  • With "dual full" and "dual low" storage, the uploaded images synced to Cloudinary and were delivered from Cloudinary.
  • An animated GIF uploaded through the new path kept all frames in every local size, and Cloudinary delivers an animated GIF.
  • The Media Library grid and the editor are now cross-origin isolated (Document-Isolation-Policy: isolate-and-credentialless). The Media Library widget script loads from media-library.cloudinary.com again (Load the Media Library widget script from the CDN again #1378). On both screens it loads without errors, the Cloudinary tab in the media modal opens the widget, and the browser still sends the user's Cloudinary login cookie to it.
  • With "Cloudinary only" storage, the image is not synced right after upload. During that time, the medium-size URL is malformed (test-image-6-300x225.jpg/test-image-6-300x225.jpg.jpg). The classic upload path gives the same result, so this is not caused by 7.2.

Checked against the Field Guide; no change needed

  • SVG icons in the admin menu and admin bar: the plugin uses its own dashicons-cloudinary font icon, which has no core-admin replacement, so it renders as before. The admin bar node has no ab-icon, and no plugin CSS targets core menu or admin bar icons.
  • Editor: the plugin does not use the Options/View menu as prop, the deprecated components, asButtons, FontFamilyControl, __experimentalGroup, __experimentalImageEditor or the style-state API. registry.subscribe in terms-inspector.js does not pass a store name, so the 7.2 change to it does not affect the plugin.
  • Cross-origin isolation: the plugin does not call wp_start_cross_origin_isolation_output_buffer() or wp_add_crossorigin_attributes(). 7.2 no longer adds crossorigin to the Media Library widget script, and the CDN now sends CORS headers, so the script also works on 7.1.
  • REST revisions now return only revisioned meta. The featured-image transformation meta (show_in_rest, not revisioned) is no longer reset when a revision is restored. This is a fix, not a regression.
  • The plugin does not use the Abilities API, the Interactivity API, the comments status parameter, rest_allowed_cors_methods, NO_BACKSLASH_ESCAPES, the compression constants or text shadow.
  • /random/ redirects do not apply, because both plugin post types use public => false.
  • Admin: the "Howdy" move and the Add Theme menu position do not affect the plugin.

Results on 7.2-RC2 with the latest develop

  • PHPUnit: 80 tests pass.
  • E2E: all 55 tests pass (1 skipped), including the updated gallery block tests from develop. The suite also passes on 7.1.4.
  • PHP log: no 7.2-specific deprecations, notices or errors.
  • JS console, compared with 7.1.4: the only new message is JQMIGRATE: DEPRECATED: jQuery.proxy() on the Media grid. It comes from core. The plugin does not call jQuery.proxy().

Follow-up for 7.3 (not a 7.2 blocker)

  • 7.2 ships jQuery Migrate 3.6.0, and core plans to move to jQuery 4 in 7.3. jQuery 4 removes $.isFunction, which is called in src/js/wp-color-picker-alpha.js (lines 545, 599, 626) and src/js/components/settings-page.js (line 36). Those calls must be replaced before 7.3.

Already present on 7.1.4 (out of scope)

  • cloudinary/gallery uses block apiVersion: 2, which has been deprecated since 6.9.
  • src/js/components/video.js calls getMedia, which has been deprecated since 6.9.
  • cloudinary.Cloudinary.new() in the video preview templates.
  • PHP warning Attempt to read property "post_title" on null in php/assets/class-rest-assets.php when a cache point is missing.
  • After the first wp cloudinary sync pass, the relationship row keeps public_id NULL until a later read. This can make the video delivery E2E test fail sometimes.

Not tested

  • Multisite upload quota for sizes generated in the browser.
  • Images attached to the post automatically when it is saved in the block editor.
  • Safari and Firefox. They do not support browser-side processing and use the classic upload path, which was tested.

Tested up to in readme.txt is still 7.1.4. Bump it when 7.2 ships (Dec 8).

QA notes

  • Run npm ci, then npm run env:start. The environment now installs WordPress 7.2-RC2. If .wp-env.override.json sets core, remove that key.
  • If the tests site has the plugin inactive or the theme set to default, run npx wp-env run tests-cli wp plugin activate cloudinary_wordpress and npx wp-env run tests-cli wp theme activate twentytwentyfive.
  • Run npx playwright install chromium if Playwright reports a missing browser, then run npm run test:unit and npm run test:e2e.
  • Client-side upload, in Chrome 137+ on localhost or HTTPS:
    • Open Media > Library (grid) and confirm that window.crossOriginIsolated is true in the console.
    • Upload a JPEG and an animated GIF.
    • In the Network tab, confirm the /wp/v2/media, /sideload and /finalize requests.
    • Confirm that each image syncs and is delivered from res.cloudinary.com, and that the GIF stays animated.
  • On Media > Library (grid) and in the post editor, open the media modal, go to the Cloudinary tab, and confirm that the Media Library widget loads. In the Network tab, confirm that media-library.cloudinary.com/global/all.js loads with status 200.
  • Open the Cloudinary settings pages, the post editor with an image block and the Cloudinary Gallery block, and the front end. Confirm that there are no new PHP log entries and no new plugin warnings in the JS console. On the Gallery settings page, confirm that the controls look the same as on 7.1.4.

Rebuild the committed assets from the current lockfile. The bundles
still contained @wordpress/components 43. They now use
@wordpress/components 44.0.0, @wordpress/ui 0.26.0 and
@wordpress/dataviews 22.0.0, the minimum versions in the 7.2 dev note
on CSS module class name collisions. gallery-ui.css bundles the
@wordpress/components styles.

Run wp-env and CI on WordPress 7.2 (RC2 until 7.2 is released).
@utkarshcloudinary
utkarshcloudinary force-pushed the chore/wp-7-2-compatibility branch from c13b9ef to d7baa95 Compare November 23, 2026 11:38
@utkarshcloudinary
utkarshcloudinary marked this pull request as ready for review November 23, 2026 12:36
@gabrielcld2
gabrielcld2 merged commit adffa5a into develop Nov 23, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants